package cc.comac.mom.controller.config;

import cc.comac.mom.api.config.EquipConnectConfigService;
import cc.comac.mom.bean.config.EquipConnectConfigBean;
import cc.comac.mom.bean.config.EquipConnectConfigParamBean;
import cc.comac.mom.entity.config.EquipConnectConfigEntity;
import cc.comac.mom.util.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value ="/EquipConnectConfig")
public class EquipConnectConfigController {
	@Autowired
	private EquipConnectConfigService equipConnectConfigService;

	@ApiOperation("设备连接配置保存")
	@RequestMapping(value = "/save",method = RequestMethod.POST)
	public ResultBean save(@RequestBody EquipConnectConfigBean obj) {
		
		return equipConnectConfigService.save(obj);
		
	}
	@ApiOperation("设备连接配置修改")
	@RequestMapping(value = "/update",method = RequestMethod.POST)
	public ResultBean update(@RequestBody EquipConnectConfigBean obj) {
		
		return equipConnectConfigService.update(obj);
		
	}
	@ApiOperation("设备连接配置删除")
	@RequestMapping(value = "/delete",method = RequestMethod.POST)
	public ResultBean delete(@RequestBody EquipConnectConfigEntity obj) {
		
		return equipConnectConfigService.delete(obj);
		
	}
	@ApiOperation("设备连接配置查询")
	@RequestMapping(value = "/getById",method = RequestMethod.POST)
	public ResultBean getById(@RequestBody EquipConnectConfigEntity obj) {
		return equipConnectConfigService.getById(obj);
		
	}
	@ApiOperation("设备连接配置查询")
	@RequestMapping(value = "/selectByCondition",method = RequestMethod.POST)
	public ResultBean selectByCondition(@RequestBody EquipConnectConfigParamBean obj) {
		return equipConnectConfigService.selectByCondition(obj);
	}


}
